import { Input } from 'cc';
import { EventTouch } from 'cc';
import { input } from 'cc';
import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('StopPropagation')
export class StopPropagation extends Component {

    protected onLoad(): void {
        input.on(Input.EventType.TOUCH_START, (event: EventTouch) => {
            console.log("冒泡");
            event.bubbles = false;
            event.propagationImmediateStopped = true;
        }, this);
        input.on(Input.EventType.TOUCH_MOVE, (event: EventTouch) => {
            event.bubbles = false;
            event.propagationImmediateStopped = true;
        });
        input.on(Input.EventType.TOUCH_END, (event: EventTouch) => {
            event.bubbles = false;
            event.propagationImmediateStopped = true;
        });
    }

    start() {

    }
}

